package com.ajk.server.service;
import java.util.List;

import com.ajk.server.model.TestAnswer;
import com.ajk.server.model.query.TestAnswerQuery;
import com.ajk.server.model.request.PaperReq;
import com.ajk.server.model.request.QuestionAnswerReq;
import com.ajk.server.model.request.QuestionReq;
import com.ajk.server.model.response.TestAnswerRes;
import com.alibaba.fastjson.JSONObject;

/**
 * 测试记录  <br>
 * t_test_answer <br>
 * v1.0 2016-05-01
 */
 public interface TestAnswerService {
	
	/**
 	*根据ID删除 测试记录
 	*/
 	public Integer deleteTestAnswerById(Integer id);
 	
 	/**
 	*新增 测试记录
 	*/
 	public Integer batchInsertTestAnswer(List<? extends TestAnswer> testAnswers);
 	
 	/**
 	*新增 测试记录
 	*/
 	public Integer insertTestAnswer(TestAnswer domain);
 	
 	/**
 	*更新 测试记录
 	*/
 	public Integer updateTestAnswer(TestAnswer domain);
 	
 	/**
 	*根据ID查询 测试记录
 	*/
 	public TestAnswer findTestAnswerById(Integer id);

	/**
 	*通过query 查询 测试记录
 	*/
	public List<TestAnswerRes> findTestAnswerByQuery(TestAnswerQuery query);	
	
	/**
 	*通过query count总条数
 	*/
 	public Integer countTestAnswerByQuery(TestAnswerQuery query);
 	
 	/**
 	* 通过ids查询
 	*/
 	public List<TestAnswer> findTestAnswerByIds(List<Integer> ids);
 	
	public TestAnswerRes submitPaper(Integer userId,Integer paperId,String servStationId, QuestionReq question);
	
	
	public List<TestAnswerRes> findAnswer(Integer userId,Integer start,Integer limit);
 	
	public TestAnswerRes findMyLastTestAnswerRes(Integer userId);
	

	public Integer addParer(PaperReq req);
	

	public Integer modifyParer(PaperReq req);
	
	public Integer shareAnswer(Integer answerId,Integer shareCategoryId,Integer userId);
	
	public Integer modifyAutoAnswer(JSONObject object);
	
}	